package com.googlecode.lookie.imagedb.internal;

import com.googlecode.lookie.platform.osgi.LifecycleHook;

public class ImageDatabaseLifecycleHook
    implements LifecycleHook
{

    private HsqlImageDatabase database;

    public void setDatabase( HsqlImageDatabase database )
    {
        this.database = database;
    }

    public void onPostStartup()
    {
    }

    public void onPreStartup()
    {
        database.start();
    }

    public void onShutdown()
    {
        database.stop();
    }

}
